<?php
/**
 *	[TWCMS] (C)2012 TongWang Inc.
 *	$Id: content_html.tpl.php 2 2013-04-27 07:14:17Z nanown@qq.com $
 */
	defined('IN_TWCMS') || exit('Access Denied');
	include load_tpl('head');

	if(empty($this->G['ishtml'])) {
		echo '<div class="p c1"><div class="cc nothtml"><span><b>未开启</b> 生成静态</span><a class="but2 sethtml">点击设置</a></div></div>';
	}else{
?>
	<link rel="stylesheet" href="<?=TWCMS_STATIC?>jqui/ui.css">
	<script src="<?=TWCMS_STATIC?>js/jqueryui.js" type="text/javascript"></script>
	<div id="dialog"></div>
	<div class="head">
		<dl>
			<dd class="on">一键生成</dd>
			<!-- <dd>分类页生成</dd>
			<dd>内容页生成</dd> -->
		</dl>
	</div>

	<div class="p c2">
		<div class="cc">
			<!-- <a class="but2" href="javascript:;">按时间生成</a>
			<a class="but2" href="javascript:;">按ID生成</a>
			<a class="but2" href="javascript:;">全站生成</a> -->
			<a class="but2" href="javascript:writeIndex();">首页生成</a>
			<a class="but2" href="javascript:writeCate();">分类页生成</a>
			<a class="but2" href="javascript:writeShow();">内容页生成</a>
		</div>

		<!-- <div class="cc un">
			<a class="but2" href="javascript:;">生成所有分类</a>
			<a class="but2" href="javascript:;">生成某些分类</a>
		</div>

		<div class="cc un">
			<a class="but2" href="javascript:;">生成所有的文档</a>
			<a class="but2" href="javascript:;">生成某些分类的文档</a>
			<a class="but2" href="javascript:;">指定开始ID和结束ID</a>
		</div> -->
	</div>
	<?php } ?>
</div>
<script type="text/javascript">
$(function(){
	$(".sethtml").click(function(){
		parent.oneTab("?mod=setting&action=ishtml", true);
	}).attr("href","javascript:;");
});

function setDialog() {
	$( "#dialog" ).dialog({
		height: 100,
		modal: false
	});
}

function writeIndex() {
	twAjax.get("?mod=content&action=html&ajax=index&r="+time(), function(data){
		alert(data);
	});
}

function writeCate() {
	twAjax.get("?mod=content&action=html&ajax=cate&r="+time(), function(data){
		alert(data);
	});
}

function writeShow() {
	twAjax.get("?mod=content&action=html&ajax=show&r="+time(), function(data){
		alert(data);
	});
}

</script>
</body>
</html>